<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkEntryBuffer: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="NumericEntry.html" title="Numeric and Text Data Entry">
<link rel="prev" href="GtkEntry.html" title="GtkEntry">
<link rel="next" href="GtkEntryCompletion.html" title="GtkEntryCompletion">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#GtkEntryBuffer.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#GtkEntryBuffer.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
                  <a href="#GtkEntryBuffer.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
                  <a href="#GtkEntryBuffer.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="NumericEntry.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkEntry.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkEntryCompletion.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkEntryBuffer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkEntryBuffer.top_of_page"></a>GtkEntryBuffer</span></h2>
<p>GtkEntryBuffer — Text buffer for GtkEntry</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkEntryBuffer.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="returnvalue">GtkEntryBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-new" title="gtk_entry_buffer_new ()">gtk_entry_buffer_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-text" title="gtk_entry_buffer_get_text ()">gtk_entry_buffer_get_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-set-text" title="gtk_entry_buffer_set_text ()">gtk_entry_buffer_set_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gsize</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-bytes" title="gtk_entry_buffer_get_bytes ()">gtk_entry_buffer_get_bytes</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-length" title="gtk_entry_buffer_get_length ()">gtk_entry_buffer_get_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-max-length" title="gtk_entry_buffer_get_max_length ()">gtk_entry_buffer_get_max_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-set-max-length" title="gtk_entry_buffer_set_max_length ()">gtk_entry_buffer_set_max_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-insert-text" title="gtk_entry_buffer_insert_text ()">gtk_entry_buffer_insert_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-delete-text" title="gtk_entry_buffer_delete_text ()">gtk_entry_buffer_delete_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-emit-deleted-text" title="gtk_entry_buffer_emit_deleted_text ()">gtk_entry_buffer_emit_deleted_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-emit-inserted-text" title="gtk_entry_buffer_emit_inserted_text ()">gtk_entry_buffer_emit_inserted_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><span class="type">guint</span></td>
<td class="property_name"><a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer--length" title="The “length” property">length</a></td>
<td class="property_flags">Read</td>
</tr>
<tr>
<td class="property_type"><span class="type">int</span></td>
<td class="property_name"><a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer--max-length" title="The “max-length” property">max-length</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<span class="type">char</span> *</td>
<td class="property_name"><a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer--text" title="The “text” property">text</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer-deleted-text" title="The “deleted-text” signal">deleted-text</a></td>
<td class="signal_flags">Run First</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer-inserted-text" title="The “inserted-text” signal">inserted-text</a></td>
<td class="signal_flags">Run First</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer-struct" title="struct GtkEntryBuffer">GtkEntryBuffer</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GtkEntryBuffer
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.description"></a><h2>Description</h2>
<p>The <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> class contains the actual text displayed in a
<a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> widget.</p>
<p>A single <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> object can be shared by multiple <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a>
widgets which will then share the same text content, but not the cursor
position, visibility attributes, icon etc.</p>
<p><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> may be derived from. Such a derived class might allow
text to be stored in an alternate location, such as non-pageable memory,
useful in the case of important passwords. Or a derived class could 
integrate with an application’s concept of undo/redo.</p>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gtk-entry-buffer-new"></a><h3>gtk_entry_buffer_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="returnvalue">GtkEntryBuffer</span></a> *
gtk_entry_buffer_new (<em class="parameter"><code>const <span class="type">gchar</span> *initial_chars</code></em>,
                      <em class="parameter"><code><span class="type">gint</span> n_initial_chars</code></em>);</pre>
<p>Create a new GtkEntryBuffer object.</p>
<p>Optionally, specify initial text to set in the buffer.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>initial_chars</p></td>
<td class="parameter_description"><p>initial buffer text, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>n_initial_chars</p></td>
<td class="parameter_description"><p>number of characters in <em class="parameter"><code>initial_chars</code></em>
, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-buffer-new.returns"></a><h4>Returns</h4>
<p> A new GtkEntryBuffer object.</p>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-text"></a><h3>gtk_entry_buffer_get_text ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gtk_entry_buffer_get_text (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>Retrieves the contents of the buffer.</p>
<p>The memory pointer returned by this call will not change
unless this object emits a signal, or is finalized.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-get-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-buffer-get-text.returns"></a><h4>Returns</h4>
<p> a pointer to the contents of the widget as a
string. This string points to internally allocated
storage in the buffer and must not be freed, modified or
stored.</p>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-set-text"></a><h3>gtk_entry_buffer_set_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_buffer_set_text (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                           <em class="parameter"><code>const <span class="type">gchar</span> *chars</code></em>,
                           <em class="parameter"><code><span class="type">gint</span> n_chars</code></em>);</pre>
<p>Sets the text in the buffer.</p>
<p>This is roughly equivalent to calling <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-delete-text" title="gtk_entry_buffer_delete_text ()"><code class="function">gtk_entry_buffer_delete_text()</code></a>
and <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-insert-text" title="gtk_entry_buffer_insert_text ()"><code class="function">gtk_entry_buffer_insert_text()</code></a>.</p>
<p>Note that <em class="parameter"><code>n_chars</code></em>
 is in characters, not in bytes.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-set-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>chars</p></td>
<td class="parameter_description"><p>the new text</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_chars</p></td>
<td class="parameter_description"><p>the number of characters in <em class="parameter"><code>text</code></em>
, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-bytes"></a><h3>gtk_entry_buffer_get_bytes ()</h3>
<pre class="programlisting"><span class="returnvalue">gsize</span>
gtk_entry_buffer_get_bytes (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>Retrieves the length in bytes of the buffer.
See <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-length" title="gtk_entry_buffer_get_length ()"><code class="function">gtk_entry_buffer_get_length()</code></a>.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-get-bytes.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-buffer-get-bytes.returns"></a><h4>Returns</h4>
<p> The byte length of the buffer.</p>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-length"></a><h3>gtk_entry_buffer_get_length ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
gtk_entry_buffer_get_length (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>Retrieves the length in characters of the buffer.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-get-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-buffer-get-length.returns"></a><h4>Returns</h4>
<p> The number of characters in the buffer.</p>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-max-length"></a><h3>gtk_entry_buffer_get_max_length ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gtk_entry_buffer_get_max_length (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>Retrieves the maximum allowed length of the text in
<em class="parameter"><code>buffer</code></em>
. See <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-set-max-length" title="gtk_entry_buffer_set_max_length ()"><code class="function">gtk_entry_buffer_set_max_length()</code></a>.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-get-max-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-buffer-get-max-length.returns"></a><h4>Returns</h4>
<p> the maximum allowed number of characters
in <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>, or 0 if there is no maximum.</p>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-set-max-length"></a><h3>gtk_entry_buffer_set_max_length ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_buffer_set_max_length (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                 <em class="parameter"><code><span class="type">gint</span> max_length</code></em>);</pre>
<p>Sets the maximum allowed length of the contents of the buffer. If
the current contents are longer than the given length, then they
will be truncated to fit.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-set-max-length.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>max_length</p></td>
<td class="parameter_description"><p>the maximum length of the entry buffer, or 0 for no maximum.
(other than the maximum length of entries.) The value passed in will
be clamped to the range 0-65536.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-insert-text"></a><h3>gtk_entry_buffer_insert_text ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
gtk_entry_buffer_insert_text (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                              <em class="parameter"><code><span class="type">guint</span> position</code></em>,
                              <em class="parameter"><code>const <span class="type">gchar</span> *chars</code></em>,
                              <em class="parameter"><code><span class="type">gint</span> n_chars</code></em>);</pre>
<p>Inserts <em class="parameter"><code>n_chars</code></em>
 characters of <em class="parameter"><code>chars</code></em>
 into the contents of the
buffer, at position <em class="parameter"><code>position</code></em>
.</p>
<p>If <em class="parameter"><code>n_chars</code></em>
 is negative, then characters from chars will be inserted
until a null-terminator is found. If <em class="parameter"><code>position</code></em>
 or <em class="parameter"><code>n_chars</code></em>
 are out of
bounds, or the maximum buffer text length is exceeded, then they are
coerced to sane values.</p>
<p>Note that the position and length are in characters, not in bytes.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-insert-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the position at which to insert text.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>chars</p></td>
<td class="parameter_description"><p>the text to insert into the buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_chars</p></td>
<td class="parameter_description"><p>the length of the text in characters, or -1</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-buffer-insert-text.returns"></a><h4>Returns</h4>
<p> The number of characters actually inserted.</p>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-delete-text"></a><h3>gtk_entry_buffer_delete_text ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>
gtk_entry_buffer_delete_text (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                              <em class="parameter"><code><span class="type">guint</span> position</code></em>,
                              <em class="parameter"><code><span class="type">gint</span> n_chars</code></em>);</pre>
<p>Deletes a sequence of characters from the buffer. <em class="parameter"><code>n_chars</code></em>
 characters are
deleted starting at <em class="parameter"><code>position</code></em>
. If <em class="parameter"><code>n_chars</code></em>
 is negative, then all characters
until the end of the text are deleted.</p>
<p>If <em class="parameter"><code>position</code></em>
 or <em class="parameter"><code>n_chars</code></em>
 are out of bounds, then they are coerced to sane
values.</p>
<p>Note that the positions are specified in characters, not bytes.</p>
<div class="refsect3">
<a name="gtk-entry-buffer-delete-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>position at which to delete text</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_chars</p></td>
<td class="parameter_description"><p>number of characters to delete</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-buffer-delete-text.returns"></a><h4>Returns</h4>
<p> The number of characters deleted.</p>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-emit-deleted-text"></a><h3>gtk_entry_buffer_emit_deleted_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_buffer_emit_deleted_text (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                    <em class="parameter"><code><span class="type">guint</span> position</code></em>,
                                    <em class="parameter"><code><span class="type">guint</span> n_chars</code></em>);</pre>
<p>Used when subclassing <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p>
<div class="refsect3">
<a name="gtk-entry-buffer-emit-deleted-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>position at which text was deleted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_chars</p></td>
<td class="parameter_description"><p>number of characters deleted</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-emit-inserted-text"></a><h3>gtk_entry_buffer_emit_inserted_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_buffer_emit_inserted_text (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                     <em class="parameter"><code><span class="type">guint</span> position</code></em>,
                                     <em class="parameter"><code>const <span class="type">gchar</span> *chars</code></em>,
                                     <em class="parameter"><code><span class="type">guint</span> n_chars</code></em>);</pre>
<p>Used when subclassing <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p>
<div class="refsect3">
<a name="gtk-entry-buffer-emit-inserted-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>position at which text was inserted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>chars</p></td>
<td class="parameter_description"><p>text that was inserted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_chars</p></td>
<td class="parameter_description"><p>number of characters inserted</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.18</p>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkEntryBuffer-struct"></a><h3>struct GtkEntryBuffer</h3>
<pre class="programlisting">struct GtkEntryBuffer;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkEntryBuffer--length"></a><h3>The <code class="literal">“length”</code> property</h3>
<pre class="programlisting">  “length”                   <span class="type">guint</span></pre>
<p>The length (in characters) of the text in buffer.</p>
<p>Owner: GtkEntryBuffer</p>
<p>Flags: Read</p>
<p>Allowed values: &lt;= 65535</p>
<p>Default value: 0</p>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryBuffer--max-length"></a><h3>The <code class="literal">“max-length”</code> property</h3>
<pre class="programlisting">  “max-length”               <span class="type">int</span></pre>
<p>The maximum length (in characters) of the text in the buffer.</p>
<p>Owner: GtkEntryBuffer</p>
<p>Flags: Read / Write</p>
<p>Allowed values: [0,65535]</p>
<p>Default value: 0</p>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryBuffer--text"></a><h3>The <code class="literal">“text”</code> property</h3>
<pre class="programlisting">  “text”                     <span class="type">char</span> *</pre>
<p>The contents of the buffer.</p>
<p>Owner: GtkEntryBuffer</p>
<p>Flags: Read / Write</p>
<p>Default value: ""</p>
<p class="since">Since: 2.18</p>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkEntryBuffer-deleted-text"></a><h3>The <code class="literal">“deleted-text”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer,
               <span class="type">guint</span>           position,
               <span class="type">guint</span>           n_chars,
               <span class="type">gpointer</span>        user_data)</pre>
<p>This signal is emitted after text is deleted from the buffer.</p>
<div class="refsect3">
<a name="GtkEntryBuffer-deleted-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the position the text was deleted at.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_chars</p></td>
<td class="parameter_description"><p>The number of characters that were deleted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run First</p>
<p class="since">Since: 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryBuffer-inserted-text"></a><h3>The <code class="literal">“inserted-text”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer,
               <span class="type">guint</span>           position,
               <span class="type">char</span>           *chars,
               <span class="type">guint</span>           n_chars,
               <span class="type">gpointer</span>        user_data)</pre>
<p>This signal is emitted after text is inserted into the buffer.</p>
<div class="refsect3">
<a name="GtkEntryBuffer-inserted-text.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>the position the text was inserted at.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>chars</p></td>
<td class="parameter_description"><p>The text that was inserted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_chars</p></td>
<td class="parameter_description"><p>The number of characters that were inserted.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run First</p>
<p class="since">Since: 2.18</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>